package com.freewater.springboot.demo.dataaccess.jdbc.customtraslator;

import lombok.AllArgsConstructor;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.annotation.Transactional;

@AllArgsConstructor
@Transactional
public class SomeDao {

    private JdbcTemplate jdbcTemplate;

    public void testCustomSqlError() {
        this.jdbcTemplate.execute("create table t_user(id int primary key, name varchar(100))");
        Integer count = this.jdbcTemplate.queryForObject("select count(*) from t_user", Integer.class);
        System.out.println("user count >>> " + count);
    }
}
